const express = require('express');
const router=express.Router();



router.get('/', (req, res) => {
    //取出客户端的携带的cookie
    // console.log(req.cookies);

    // //给客户端写入cookie
    // // res.cookie('money','9.9',{});
    // res.cookie('mycode','aabb');
    // console.log(req.session.aabb);

    //将session存储起来(保存在服务端)
    req.session.aabb='哈哈';

    res.send('ok');
});

router.get('/xx',(req,res)=>{
    //取出存储的session
    console.log(req.session.aabb);
    res.send('xx');
})


module.exports = router;